<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>
  
</head>

<body class="ihg-theme-draft">

  <%@ include file="/WEB-INF/include/header.jsp"%>

  <div class="container-fluid ihg-container">

    <div class="ihg-content-layout has-operation">

      <div class="ihg-breadcrumb">
        <ol class="breadcrumb border-breadcrumb  no-bottom-border">
          <li class="active">报告精修</li>
        </ol>
        
        <div class="pull-right">
          <a href="${ctx.host}/active-sessions/${session.id}" style="color: #155CB2; font-size: 16px;">&lt;&lt;&nbsp;<fmt:message key="assessor.super.2" /></a>
        </div>
      </div>
      
      <table class="table ihg-table peer-calibration-table" style="border-bottom: 1px solid #D45F16; margin-top: 10px;">
        <thead style="border-top: 2px solid #D45F16;">
          <tr>
            <th style="min-width: 330px; text-align: left;"><fmt:message key="assessor.377" /></th>
            <th style="min-width: 200px; text-align: left;"><fmt:message key="assessor.378" /></th>
            <th style="min-width: 140px; max-width: 200px; text-align: center;"><fmt:message key="assessor.379" /></th>
            <th style="min-width: 140px; max-width: 170px; text-align: center;"><fmt:message key="assessor.380" /></th>
            <th><fmt:message key="assessor.381" /></th>
          </tr>
        </thead>
        
        <tbody>
          <c:forEach var="sessionCalibration" items="${sessionCalibrations}">
            <tr>
              <td>
                <div class="delegate-avater" style="background-color: #F4F2ED; display: inline-block; width: 100px; height: 100px; vertical-align: middle;"><img src="${sessionCalibration.delegate.avatar}"></div>
                <div class="delegate-information text-left" style="width: 185px; display: inline-block; margin-left: 10px; vertical-align: middle;">
                  <strong><fmt:message key="assessor.382" /> ${sessionCalibration.delegate.name}</strong>
                  <p><fmt:message key="assessor.238" />${sessionCalibration.delegate.telephone}<br>
                    <a href="${ctx.host}/sessions/${session.id}/peer-calibrations/career-work?delegate=${sessionCalibration.delegate.id}" target="_blank"><fmt:message key="assessor.383" /></a><br/>
                    <a href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/exercise-notes" data-target="#viewExerciseNotes" data-toggle="modal"><fmt:message key="assessor.405" /></a>
                  </p><br>
                  <strong><fmt:message key="assessor.384" />：${sessionCalibration.leadAssessor.name}</strong>
                  <p><fmt:message key="assessor.238" /> ${sessionCalibration.leadAssessor.telephone}</p>
                </div>
              </td>
              <td  class="strength-area">
                <c:set var="competency" value="${sessionCalibrationCompetencies[sessionCalibration.idString]}"/>
                <div class="text-left">
                  <a href="javascript:void(0);" class="anchor"><fmt:message key="competency.name.5" /></a>
                  <span class="label label-${competency['Lead And Development'].status.finish ? competency['Lead And Development'].score.dn ? 'weakness' : competency['Lead And Development'].score.c ? 'common' : 'strength' :'default'}">${competency['Lead And Development'].status.finish ? competency['Lead And Development'].score.alias : '?'}</span>
                </div>
                <div class="text-left">
                  <a href="javascript:void(0);" class="anchor"><fmt:message key="competency.name.1" /></a>
                  <span class="label label-${competency['Drive Result'].status.finish ? competency['Drive Result'].score.dn ? 'weakness' : competency['Drive Result'].score.c ? 'common' : 'strength' :'default'}">${competency['Drive Result'].status.finish ? competency['Drive Result'].score.alias : '?'}</span>
                </div>
                <div class="text-left">
                  <a href="javascript:void(0);" class="anchor"><fmt:message key="competency.name.2" /></a>
                  <span class="label label-${competency['Work Collaboratively'].status.finish ? competency['Work Collaboratively'].score.dn ? 'weakness' : competency['Work Collaboratively'].score.c ? 'common' : 'strength' :'default'}">${competency['Work Collaboratively'].status.finish ? competency['Work Collaboratively'].score.alias : '?'}</span>
                </div>
                <div class="text-left">
                  <a href="javascript:void(0);" class="anchor"><fmt:message key="competency.name.4" /></a>
                  <span class="label label-${competency['Champion Change'].status.finish ? competency['Champion Change'].score.dn ? 'weakness' : competency['Champion Change'].score.c ? 'common' : 'strength' :'default'}">${competency['Champion Change'].status.finish ? competency['Champion Change'].score.alias : '?'}</span>
                </div>
                <div class="text-left">
                  <a href="javascript:void(0);" class="anchor">业主关系</a>
                  <span class="label label-${competency['Owner Relations'].status.finish ? competency['Owner Relations'].score.dn ? 'weakness' : competency['Owner Relations'].score.c ? 'common' : 'strength' :'default'}">${competency['Owner Relations'].status.finish ? competency['Owner Relations'].score.alias : '?'}</span>
                </div>
                <div class="text-left">
                  <a href="javascript:void(0);" class="anchor">运营管理</a>
                  <span class="label label-${competency['Operations Management'].status.finish ? competency['Operations Management'].score.dn ? 'weakness' : competency['Operations Management'].score.c ? 'common' : 'strength' :'default'}">${competency['Operations Management'].status.finish ? competency['Operations Management'].score.alias : '?'}</span>
                </div>
                <div class="text-left">
                  <a href="javascript:void(0);" class="anchor">收益最大化</a>
                  <span class="label label-${competency['Revenue Maximisation'].status.finish ? competency['Revenue Maximisation'].score.dn ? 'weakness' : competency['Revenue Maximisation'].score.c ? 'common' : 'strength' :'default'}">${competency['Revenue Maximisation'].status.finish ? competency['Revenue Maximisation'].score.alias : '?'}</span>
                </div>
                <div class="text-left">
                  <a href="javascript:void(0);" class="anchor"><fmt:message key="competency.name.6" /></a>
                  <span class="label label-${competency['Financial Management'].status.finish ? competency['Financial Management'].score.dn ? 'weakness' : competency['Financial Management'].score.c ? 'common' : 'strength' :'default'}">${competency['Financial Management'].status.finish ? competency['Financial Management'].score.alias : '?'}</span>
                </div>
              </td>
              <td>
                <a href="javascript:void(0);">
                  <img src="${ctx.resource}/images/${sessionCalibrationComments[sessionCalibration.idString].status.finish ? 'calibration-completed' : 'calibration-to-be-completed'}.png">
                </a>
              </td>
              <td class="readiness-recommendation">
                <div class="text-center">
                  <c:choose>
                    <c:when test="${not empty sessionCalibrationRecommendations[sessionCalibration.idString]}">
                      <a href="javascript:void(0);"><fmt:message key="${sessionCalibrationRecommendations[sessionCalibration.idString].simpleHotelResult.message}" /></a>
                      <%-- <c:if test="${sessionCalibrationRecommendations[sessionCalibration.idString].simpleHotel}">
                        <a href="javascript:void(0);"><fmt:message key="${sessionCalibrationRecommendations[sessionCalibration.idString].simpleHotelResult.message}" /> for <fmt:message key="assessor.440" /></a>
                      </c:if>
                      <c:if test="${sessionCalibrationRecommendations[sessionCalibration.idString].averageHotel}">
                        <a href="javascript:void(0);"><fmt:message key="${sessionCalibrationRecommendations[sessionCalibration.idString].averageHotelResult.message}" /> for <fmt:message key="assessor.439" /></a>
                      </c:if>
                      <c:if test="${sessionCalibrationRecommendations[sessionCalibration.idString].complexHotel}">
                        <a href="javascript:void(0);"><fmt:message key="${sessionCalibrationRecommendations[sessionCalibration.idString].complexHotelResult.message}" /> for <fmt:message key="assessor.438" /></a>
                      </c:if> --%>
                    </c:when>
                    <c:otherwise>
                      <a href="javascript:void(0);">
                        <img src="${ctx.resource}/images/calibration-to-be-completed.png">
                      </a>
                    </c:otherwise>
                  </c:choose>
                </div>
              </td>
              <td>
                <c:choose>
                  <c:when test="${reportTaskStatus[sessionCalibration.delegate.id].finish}">
                    <a href="${ctx.host}/sessions/${session.id}/supervisor-calibrations/${sessionCalibration.id}/report-writing" class="btn btn-default" style="width: 110px;background: #3CAED6; color: #fff;"> <fmt:message key="assessor.385-1" /><br><fmt:message key="assessor.385-3" /></a>
                  </c:when>
                  <c:otherwise>
                    <a href="javascript:void(0);" class="btn btn-default" style="width: 110px;"> <fmt:message key="assessor.385-1" /><br><fmt:message key="assessor.385-3" /></a>
                  </c:otherwise>
                </c:choose>
              </td>
            </tr>
          </c:forEach>
        </tbody>
      </table>

    </div>
  </div>
  
  <%@ include file="/WEB-INF/include/footer.jsp"%>
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource root="${ctx.resource}/build" type="script" src="js/page/session/during/supervisor-calibration/peer-calibration-list.js" />
  <script type="text/javascript">
    require([ 'page/session/during/supervisor-calibration/peer-calibration-list' ], function(page) {
      page.init();
    })
  </script>

</body>
</html>